package net.vkits.admin.domain.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Created by ethan-liu on 2017/1/14.
 */
public enum ContentType {
    Index("首页"), CardInfo("喵喵卡讯"), BackGarden("喵喵后花园");
    private final String value;

    ContentType(String value) {
        this.value = value;
    }

    @JsonValue
    public String getValue() {
        return this.value;
    }

    @JsonCreator
    public static ContentType create(String value) {
        if(value == null) {
            throw new IllegalArgumentException();
        }
        return ContentType.valueOf(value);
    }
}
